module ima_adpcm_top (
    // Clock and reset
    input  wire         clock,
    input  wire         reset,
    
    // Input interface
    input  wire [15:0]  audio_in,
    input  wire         audio_in_valid,
    output wire         audio_in_ready,
    
    // Output interface
    output wire [15:0]  audio_out,
    output wire         audio_out_valid,
    output  wire        audio_out_ready,
    
);

    // Internal signals
    wire [3:0]  enc_pcm;
    wire        enc_valid;

    
    // Encoder instance
    ima_adpcm_enc u_encoder (
        .clock          (clock),
        .reset          (reset),
        .inSamp         (audio_in),
        .inValid        (audio_in_valid),
        .inReady        (audio_in_ready),
        .outPCM         (enc_pcm),
        .outValid       (enc_valid),
        .outPredictSamp (),  // Not used
        .outStepIndex   ()   // Not used
    );
    
    // Decoder instance
    ima_adpcm_dec u_decoder (
        .clock          (clock),
        .reset          (reset),
        .inPCM          (enc_pcm),
        .inValid        (enc_valid),
        .inReady        (audio_out_ready),
        .inPredictSamp  (16'b0),
        .inStepIndex    (7'b0),
        .inStateLoad    (1'b0),
        .outSamp        (audio_out),
        .outValid       (audio_out_valid)
    );


endmodule
